package com.jincheng.web.controller.system;

import com.jincheng.common.core.controller.BaseController;
import com.jincheng.common.core.domain.AjaxResult;
import com.jincheng.system.service.IMappingService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 映射控制类
 */
@RestController
@RequestMapping("/system/mapping")
public class MappingController extends BaseController {

    private final IMappingService mappingService;

    public MappingController(IMappingService mappingService) {
        this.mappingService = mappingService;
    }

    /**
     * 获取查询分类信息信息
     */
    @GetMapping("/data")
    public AjaxResult module() {
        return success(mappingService.getActivityScreens());
    }

    /**
     * 获取轮播图信息
     */
    @GetMapping("/slideshow")
    public AjaxResult slideshow() {
        return success(mappingService.getSlideshow());
    }

    /**
     * 获取系统统计信息
     */
    @GetMapping("/system/statistics")
    public AjaxResult systemStatistics() {
        return success(mappingService.getSystemStatistics());
    }
}
